# coding: utf-8
 
import string
 
def chartype(ch):
    """字符类型判断"""
    if ch in string.ascii_letters: return 'ascii_letters'
    elif ch in string.digits: return 'digits'
    elif ch in string.whitespace: return 'whitespace'
    else: return 'other'
  
def chtypecount(s):
    """字符串类型计数器"""
    counter = {}
    for ct in map(chartype, s):
        counter.setdefault(ct, 0)
        counter[ct] += 1
    return counter
 
for chtype, cnts in chtypecount(raw_input("Enter a string: ")).items():
    print chtype, cnts